]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Remove slot property of WindowPreview
authorJonas Dreßler <verdre@v0yd.nl>
Tue, 2 Jun 2020 14:23:59 +0000 (16:23 +0200)
committerJonas Dreßler <verdre@v0yd.nl>
Tue, 16 Jun 2020 11:55:17 +0000 (13:55 +0200)
Since the slot property was only accessed by the old WindowOverlays to
get the position and size of the preview, we can safely stop setting it
and remove that property now.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307

js/ui/workspace.js

index 1f40f1d5f5aa9e2a390e3d6100a5e1f626ce686c..c7d9d81666287c7286f829ef8c0cb35e6b286d96 100644 (file)
@@ -231,8 +231,6 @@ var WindowPreview = GObject.registerClass({
         this._delegate = this;
 
         this.slotId = 0;
-        this._slot = [0, 0, 0, 0];
-        this._dragSlot = [0, 0, 0, 0];
         this._stackAbove = null;
 
         this._windowContainer.layout_manager.connect(
@@ -513,17 +511,6 @@ var WindowPreview = GObject.registerClass({
         return this.hasAttachedDialogs();
     }
 
-    set slot(slot) {
-        this._slot = slot;
-    }
-
-    get slot() {
-        if (this.inDrag)
-            return this._dragSlot;
-        else
-            return this._slot;
-    }
-
     deleteAll() {
         const windows = this._windowContainer.layout_manager.getWindows();
 
@@ -732,7 +719,6 @@ var WindowPreview = GObject.registerClass({
     }
 
     _onDragBegin(_draggable, _time) {
-        this._dragSlot = this._slot;
         this.inDrag = true;
         this.hideOverlay(false);
         this.emit('drag-begin');
@@ -1362,7 +1348,6 @@ class Workspace extends St.Widget {
 
             const cloneWidth = cellWidth;
             const cloneHeight = cellHeight;
-            clone.slot = [x, y, cloneWidth, cloneHeight];
 
             if (!clone.positioned) {
                 // This window appeared after the overview was already up
@@ -1559,7 +1544,6 @@ class Workspace extends St.Widget {
             const height = win._overviewHint.height;
             delete win._overviewHint;
 
-            clone.slot = [x, y, width, height];
             clone.positioned = true;
 
             clone.set_position(x, y);